import request from '@/utils/request'

export default{
  //查询所有
  getList(currentPage,pageSize,good){
    return request({
      url: `/good/${currentPage}/${pageSize}`,
      method:'post',
      data:good
    })
  },
  //添加品牌
  add(good){
    return request({
      url: `/good/`,
      method:'post',
      data:good
    })
  },
  //根据id查询
  queryById(id){
    return request({
      url: `/good/${id}/`,
      method:'get',
    })
  },
  //根据id删除
  removeById(id){
    return request({
      url: `/good/${id}/`,
      method:'delete',
    })
  },
  //编辑（修改）
  modify(good){
    return request({
      url: `/good/`,
      method:'put',
      data:good
    })
  },
  //根据父id查询品牌
  querygoodByParentId(parentId){
    return request({
      url: `/good/parent/${parentId}/`,
      method:'get',
    })
  },
  //查询所有的父品牌
  querygoodAll(){
    return request({
      url: `/good/parent/`,
      method:'get',
    })
  },

}

